package main

import (
	"github.com/gomodule/redigo/redis"
	"fmt"
)

func main() {

	c, err := redis.Dial("tcp", "193.112.125.22:63118", redis.DialPassword("Yb@123456#Red"))
	if err != nil {
		fmt.Println("connect redis fail")
		return
	}

	defer c.Close()
	c.Do("SET", "foo", 1)
	fmt.Println(c.Do("GET", "foo"))
	exists, _ := redis.Bool(c.Do("EXISTS", "foo"))
	fmt.Printf("%#v\n", exists)
}
